package com.music.music.web;

import com.music.common.core.web.controller.BaseController;
import com.music.common.core.web.page.TableDataInfo;
import com.music.music.domain.MusicType;
import com.music.music.service.MusicTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 音乐类型Controller
 *
 * @author ruoyi
 * @date 2024-10-22
 */
@RestController
@RequestMapping("/musictype/web")
public class MusicTypeControllerWeb extends BaseController {
    @Resource
    private MusicTypeService musicTypeService;

    /**
     * 查询音乐类型列表
     */
    @GetMapping("/list")
    public TableDataInfo list(MusicType musicType) {
        startPage();
        List<MusicType> list = musicTypeService.selectMusicTypeListWeb(musicType);
        return getDataTable(list);
    }

}
